Write rules in Word

Write rules in Word

Using Microsoft Word you can write your rules in plain English. You then format these rules with the styles provided on the Oracle Policy Modeling tab to enable them to be compiled into a format that can be used by the Oracle Determinations Engine.

 

 

Before you start writing rules, you need to change some of the default settings in Word.

What do you want to do?

Prepare Word for writing rules

Understand Oracle Policy Modeling format and structure

Write a rule in Word

Prepare Word for writing rules

Some normal settings in Microsoft Word will interfere with rule creation by Oracle Policy Modeling, so you will need to make the following changes to Word settings:

AutoCorrect

In Tools | AutoCorrect Options | AutoCorrect tab (in Word 2003), or Word Options | Proofing | AutoCorrect Options | AutoCorrect tab (in Word 2007 and later):

AutoFormat As You Type

In Tools | AutoCorrect Options | AutoFormat As You Type tab (in Word 2003), or Word Options | Proofing | AutoCorrect Options | AutoFormat As You Type tab (in Word 2007 and later):

Measurement Units and Style Area

Set the units of measurement to Centimeters and the Style Area Width to about 3cm – this will help you to see what is happening with the Oracle Policy Modeling styles.

For Word 2003:

For Word 2007 and later, the Show Styles button in the Document group of the Oracle Policy Modeling tab provides a shortcut to display the style area.

 

 

The settings to do this manually in Word 2007 and later can be found in Word Options | Advanced | Display:

TIPS: 

  1. Make sure that the rule language and the dictionary language in Microsoft Word are synchronized (eg if the rule language is English (American), the dictionary language in Word should be English (U.S.)).
  2. For extremely complex projects containing either very large rule documents (70+ pages) or large numbers of rule documents, you should also turn off auto-saving, backup and background repagination to improve the performance of Microsoft Word with Oracle Policy Modeling.

Understand Oracle Policy Modeling format and structure

Oracle Policy Modeling format is quite strict in order to maintain consistency and completeness of rules and to avoid logical ambiguity. In particular, styles and indentation play an important role in recognizing the meaning of rules. Indentation and styles are used to separate the conditions from the conclusion, and conditions of different levels from each other. Distinct conditions are separated onto different lines, and the placement of and and or between conditions has special significance.

Rules need to be marked up in Word using Oracle Policy Modeling styles in order to be recognized by the Oracle Policy Modeling compiler. The styles appear in the Oracle Policy Modeling toolbar and in the document templates which are attached to all Word documents created through Oracle Policy Modeling. Oracle Policy Modeling looks for these styles when parsing your rules to determine the various rule components. Each style has a unique style name and coloring to make it easy to identify. Text which is not in the Oracle Policy Modeling styles is ignored by the Oracle Policy Modeling compiler.

The rule below shows an example of the OPM styles that would be applied in Word using the Conclusion and Level styles on the Oracle Policy Modeling tab:

 

 

the claimant is eligible for living allowances if OPM - conclusion

the claimant is living alone and OPM - level 1

the claimant satisfies the age criteria OPM - level 1

the claimant satisfies the male age criteria OPM - level 2

the claimant is aged over 65 and OPM - level 3

the claimant is a man OPM - level 3

or OPM - level 2

the claimant satisfies the female age criteria OPM - level 2

the claimant is aged over 60 and OPM - level 3

the claimant is a woman OPM - level 3

Write a rule in Word

To write a rule in Word:

  1. Create and open a Word document in your project.
    In Word you will notice the Oracle Policy Modeling toolbar. (If the toolbar is not visible in Word 2003, go to View | Toolbars | Oracle Policy Modeling to open it.) This toolbar is what you will use to format your rules in Oracle Policy Modeling styles.
  2. Put the cursor on a new blank line in the Word document.
  3. Type "the person is happy if". This will form your rule conclusion.
  4. Place the cursor somewhere in this text and click the Conclusion button on the Oracle Policy Modeling toolbar.
  5. Place the cursor at the end of the line (after the "if") and press the Enter key to start a new paragraph.
    The Level 1 style
    will automatically be applied to the new paragraph. You will notice that the Level 1 style is indented slightly from the Conclusion style to highlight the difference in rule levels.
  6. Type "the sun is shining".
    That’s it! You have just created a rule in Word.